package com.audaque.springboot.foshanupload.core.enums;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @author helen
 * @since 2019/12/25
 * 参考 HttpStatus
 */
@Schema(description = "响应对象枚举")
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public enum ResultCodeEnum {

    SUCCESS(true, "200", "操作成功"),
    FAILE(false, "500", "服务端异常"),
    NOT_LOGIN(false, "401.1", "未登录"),
    LOGIN_FAILE(false, "401.2", "登录失败"),
    NOT_AUTHORIZATION(false, "401.3", "未授权"),
    GATEWAY_EXCEPTION(false, "502.1", "网关异常"),
    DUPLICATE_KEY(false, "551", "主键冲突");

    @Schema(description = "是否成功")
    private Boolean success;
    @Schema(description = "错误码")
    private String code;
    @Schema(description = "错误信息")
    private String msg;


}
